A data center (DC) network is a network applied to a DC. Traffic in a DC features centralized data exchanging, a large east-to-west traffic volume, and the like, and therefore requirements such as a large scale, high scalability, high robustness, a low cost, and the like are further imposed on the DC network. In this background, currently, most large-scale DC networks are based on a CLOS architecture. The CLOS is a switching architecture with the features of re-arrangeable, non-blocking, and scalable.
A large-scale DC network requires highly efficient packet forwarding. For example, a 128-port switch is used to build a DC network (i.e., 5-stage CLOS) with three levels of switches. 524,288 servers can be supported, and 20,480 switches are required in total. How to efficiently forward packets between 524,288 servers according to the features of the CLOS architecture using the 20,480 switches is an urgent problem to be resolved.
The 5-stage CLOS architecture is an architecture in which a packet flow is forwarded along the route: leaf→agg→spine→agg→leaf. leaf is a switching node interconnected to a server, agg is a switching node for aggregation with leaf, and spine is a spine switching node. In other approaches, a solution to packet forwarding in the 5-stage CLOS architecture is put forward. The solution uses a hierarchical Media Access Control (MAC) address to forward a packet. A format of the MAC address includes POD.Position.Port.Vmid. Pool of Devices (POD) is a set of switches, and the POD has only one connection to each spine node. Position is a position of a leaf switch in the POD. For example, there are two leaf switches numbered 0 and 1 in a POD 0. Port is a port number of a leaf switch. For example, four port numbers of the leaf switch numbered 1 in the POD 0 are 0, 1, 2, and 3. Vmid is a serial number of a virtual machine on a physical machine. A control plane generates a forwarding table. In a process of forwarding a packet, a data plane looks up the table hop by hop according to a destination address of the packet in a longest match manner such that the packet is finally forwarded to a destination.
In a research process, the inventor finds that, when the DC network has a large capacity and many switching nodes, the solution requires a large number of entries, and a table lookup speed is low. Consequently, efficiency of packet forwarding is relatively low.